﻿<!--
// ****************************************************************************
// <author>mishkin Ivan</author>
// <email>Mishkin_Ivan@mail.ru</email>
// <date>28.01.2015</date>
// <project>ItemsFilter</project>
// <license> GNU General Public License version 3 (GPLv3) </license>
// ****************************************************************************
-->
<UserControl x:Class="Northwind.NET.Sample.CategoriesView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:Northwind.NET.Sample"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             x:Name="UserControl"
             DataContext="{Binding Path=Categories,
                                   Source={x:Static local:Workspace.This}}"
             d:DesignHeight="480"
             d:DesignWidth="640"
             mc:Ignorable="d">

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="15*" />
            <RowDefinition Height="17*" />
        </Grid.RowDefinitions>
        <DataGrid Grid.RowSpan="2"
                  AutoGenerateColumns="False"
                  ItemsSource="{Binding}">
            <DataGrid.Columns>
                <DataGridTextColumn Width="Auto"
                                    Binding="{Binding ID}"
                                    Header="ID" />
                <DataGridTextColumn Width="Auto"
                                    Binding="{Binding Name}"
                                    Header="Category name" />
                <DataGridTextColumn Binding="{Binding Description}" Header="Description" />
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</UserControl>